package san60;

import java.text.DecimalFormat;
import java.util.Scanner;

public class Main11 {

    static double len = 0;

    public static void dfs(int n,int[][] adder, boolean[] cache, int path, int curV, double curLen, int choose){
        if (path == n){
            len = len > curLen ? len : curLen;
            return;
        }


        int tempMax = 0;
        int tempIndex = 0;

        for (int i=0;i<cache.length;i++){
            if (!cache[i])continue;
            if (adder[i][0]*adder[i][1] > tempMax){
                tempMax = adder[i][0]*adder[i][1];
                tempIndex = i;
            }
        }

        int vCh = adder[tempIndex][0] * adder[tempIndex][1];
        double lenCh = curV*adder[tempIndex][1] + 0.5*adder[tempIndex][0]*adder[tempIndex][1]*adder[tempIndex][1];
        cache[tempIndex] = true;

        dfs(n, adder, cache, path+1, curV+vCh, curLen+lenCh,0);

/*
        for (int i=0;i<cache.length;i++ ){
            if (!cache[i] && i!=choose){
                int vChange = adder[choose][0] * adder[choose][1];
                double lenChange = curV*adder[choose][1] + 0.5*adder[choose][0]*adder[choose][1]*adder[choose][1];
                cache[i] = true;
                dfs(n, adder,cache,path+1,curV+vChange,curLen+lenChange,i);
                cache[i] = false;
            }
        }*/

    }



    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] adder = new int[n][2];

        for (int i=0;i<n;i++){
            int v = sc.nextInt();
            int t = sc.nextInt();
            adder[i][0] = v;
            adder[i][1] = t;
        }

        boolean[] cache = new boolean[n];

        len = 0;

        for (int i=0;i<n;i++){
            dfs(n,adder,cache,0,0,0,i);
        }


        DecimalFormat decimalFormat = new DecimalFormat("#.0");
        String format = decimalFormat.format(len);
        System.out.print(format);

    }
}
